<template>
    <!-- 搜索 -->
    <el-form :inline="true" label-width="70px">
      <el-form-item label="作者" style="width: 230px">
        <el-input v-model="search.username" placeholder="请输入作者名称" />
      </el-form-item>
      <!-- <el-form-item label="书名" style="width: 230px">
        <el-input v-model="search.bookname" placeholder="请输入书名" />
      </el-form-item> -->
      <!-- <el-form-item label="显示" style="width: 230px">
        <el-select placeholder="请选择" v-model="search.status">
          <el-option label="显示" value="1" />
          <el-option label="隐藏" value="0" />
        </el-select>
      </el-form-item> -->
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
      </el-form-item>
    </el-form>
    <!-- /搜索 -->
  </template>
  
  <script>
  export default {
    data() {
      return {
        search: {
          username: "",
          // bookname: "",
          // status:''
        },
      };
    },
    methods: {
      onSubmit() {
        this.$emit("onSearch", {
            username: this.search.username,
            // bookname: this.search.bookname,
          // status:this.search.status
        });
      },
      reset(){
        this.search = {
          username: "",
        }
      }
    },
  };
  </script>
  
  <style lang="scss" scoped></style>